{% extends 'account/person_center.html' %}
{% load i18n static %}

{% block head %}
    <title>修改密码</title>
{% endblock head %}

{% block person %}
<div class="tabs">
    <ul>
        <li class="is-active"><a>修改密码</a></li>
    </ul>
</div>
<div class="content">
    <form method="post">
        {% csrf_token %}
            {% if form.errors %}
                <p class="errornote">
                    {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
                </p>
            {% endif %}
                
                
            <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
                
            <fieldset class="field">

                <div class="field">
                    {{ form.old_password.errors }}
                    {{ form.old_password.label_tag }}
                    <div class=" control">
                        <input class="input" type="password" name="{{ form.old_password.html_name }}" id="{{ form.old_password.id_for_label }}" placeholder="请输入你的旧密码">
                    </div>
                </div>
                
                <div class="field">
                    {{ form.new_password1.errors }}
                    {{ form.new_password1.label_tag }} 
                    <!-- {{ form.new_password1 }} -->
                    <div class=" control">
                        <input class="input" type="password" name="{{ form.new_password1.html_name }}" id="{{ form.new_password1.id_for_label }}" placeholder="请输入你的新密码">
                    </div>
                    {% if form.new_password1.help_text %}
                    <div class="help">{{ form.new_password1.help_text|safe }}</div>
                    {% endif %}
                </div>
                
                <div class="field">
                {{ form.new_password2.errors }}
                    {{ form.new_password2.label_tag }} 
                    <!-- {{ form.new_password2 }} -->
                    <div class=" control">
                        <input class="input" type="password" name="{{ form.new_password2.html_name }}" id="{{ form.new_password2.id_for_label }}" placeholder="请再次输入你的新密码">
                    </div>
                    {% if form.new_password2.help_text %}
                    <div class="help">{{ form.new_password2.help_text|safe }}</div>
                    {% endif %}
                </div>
                
            </fieldset>
                
            <div class="buttons">
                <input class="button is-primary" type="submit" value="{% trans 'Change my password' %}" >
            </div>
                
              
    </form>
</div>
{% endblock person %}

    
